1. Field of the Invention
The present invention relates generally to a three-dimensional modeling system, and in particular, to a method, apparatus, and article of manufacture for directly repositioning a face of a three-dimensional model.
2. Description of the Related Art
The use of constructive solid geometry (CSG) application programs is well known in the art. CSG application programs ate often expensive, complex, and difficult to learn how to use. Three-dimensional (3D) models displayed in a CSG application are made up of one or more features or primitives of various types. The geometry of individual features or primitives is determined by parameters. To modify the 3D model, each parameter of each primitive must be individually modified by a user. Such modifications are typically performed by a user using dialogs or handles on an attribute-by-attribute basis. Further, when modifying a face of a 3D model having multiple different features, each feature must be independently modified using a handle or dialog. Such modifications are time consuming and require the performance of multiple actions by a user. These problems may be better understood by a description of CSG modeling systems and prior art modification methods.
In a CSG 3D modeling system, a 3D model (also referred to as an object model) may be constructed, displayed, modified, etc. as illustrated in FIG. 1. An object model is comprised of one or more geometries such as a block 100, cylinder, sphere, polyline extrusion, etc. Each type of geometry is also referred to as a primitive or geometric primitive.
In addition to simple primitives (e.g., a block, sphere, etc.), a geometry may be made up of several primitives. Such a geometry is referred to as a composite or composite model and is created through one or more Boolean operations (such as addition [joint model] or subtraction [holes]). FIG. 2 illustrates a composite model created through one or more Boolean operations. The components 200A–200B (i.e., geometries/primitives) that make up a composite model 200 may also be referred to as features. Several primitives/features 200A–200B that are joined through addition and have a common (merged) face are referred to as merged features. For example, two joined blocks with the same height that are tied together is referred to as a composite with merged block features. As illustrated in FIG. 2, the block 200A and cylinder cutout 200B are merged and have a common face.
Parameters are used to describe each geometry/primitive/feature. For example, a block 100 may have parameters for width, depth, length, side wall tapers, etc. Similarly, a cylinder may have parameters for radius, height, side wall taper, etc. Further, the boundary or outline of the geometry is referred to as a boundary representation for the geometry.
For each primitive, a control is utilized to adjust the parameters for the primitive. Referring to FIGS. 1 and 2A, each control has several user interface elements (referred to as handles 102A–102F, 104A–104B, 106, and 202A–F, 204, and 206) that allow a user to input information for a parameter through the use of a mouse. For example, a handle may provide how much the width of a block 100 should be changed. A handle may either be a linear handle (to adjust linear parameters) (e.g., handles 104A, 104B, and 204) or a planar handle (to adjust planar parameters) (e.g., handles 102A–F and 202A–F). Accordingly, a block's 100 control may have one or more of the following handles 102–106: a width handle (e.g., handles 102B and 102E), depth handle (e.g., handles 102C and 102F), height handle (e.g., handles 102A and 102D), edge (changes the side wall taper) handle (e.g., handles 104A–104B), a hidden handle on each face of the block 100, and a block 100 handle (e.g., handle 106) for moving the entire block 100. Both block 200A and cylinder cutout 200B may be independently selected to display the appropriate handles (i.e., handles 102–106 and 202–206) for use in modifying each component 200A/200B.
An algorithm for modifying a geometry is implemented in a method of a control (referred to as a handle dragged method). For example, if a hidden face handle is being dragged (e.g., using a mouse or cursor control device), the algorithm for modifying the geometry's appropriate face will be implemented such that the face is moved locally. Accordingly, only the face will be moved while any other part of the geometry remains unchanged. In this respect, to move a face of a composite, the merged faces must be independently and individually modified through user input (i.e., through the face handles) so that the faces remain consistent (e.g., planar). For example, as illustrated in FIG. 2B, if the front face of block 200A is modified, the cylindrical cutout 200B is not moved simultaneously. Thus, if the front face of block 200A is moved forward, the cylindrical cutout 200B would likely disappear with the length of the cylindrical cutout 200B remaining in the same location. Accordingly, the user must independently select cylindrical cutout 200B and extend its length to match any modification to block 200A.
Once modified, a view, for each primitive, implements the functionality for displaying a model using information from the geometry. A tool may be used to implement functionalities for getting and passing user interface information (i.e., handle information), such as mouse events to create or modify geometry.
As described above, to modify the primitives/features, the individual parameters of the primitives/features are modified. Accordingly, each parameter is typically modified by the user using dialogs or handles on a feature-by-feature basis. The same result can also be achieved by changing the model's boundary representation directly (i.e., not by modifying feature parameters). However, when the boundary representation of the model is changed directly, either the entire model is converted to a simple boundary representation (thereby discarding the knowledge of the primitives that were originally used to create the model), losing the procedural CSG history and thus the ability/advantages to modifying the model using feature parameters, or an additional operation is added to the procedural history. Such a conversion and/or additional operation is time consuming, complicated, and adds unnecessary complications to the modification process. Alternatively, the modifications to the geometry can be added as specific operations to the CSG history, but this introduces additional layers of complexity to subsequent interaction with the model.
Accordingly, what is needed is a method, system, and article of manufacture for easily modifying a composite geometry without requiring multiple steps from a user, without converting a model to a boundary representation, and without adding an additional operation to the procedural history.